package maosui.model;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by wdj on 14-8-10.
 */
@Entity
@Table(name = "51lpz_mianshihui")
public class MianshihuiEntity {
    private int mId;
    private String mTitle;
    private String mDetail;
    private int mCid;
    private int mRegion;
    private String mContact;
    private String mContactDetail;
    private String mAddress;
    private String mLogo;
    private byte mActivity;
    private Timestamp mTime;
    private Timestamp mTimeEnd;
    private short mListorder;
    private Timestamp mCreateTime;

    @Id
    @Column(name = "m_id", nullable = false, insertable = true, updatable = true)
    public int getmId() {
        return mId;
    }

    public void setmId(int mId) {
        this.mId = mId;
    }

    @Basic
    @Column(name = "m_title", nullable = false, insertable = true, updatable = true, length = 50)
    public String getmTitle() {
        return mTitle;
    }

    public void setmTitle(String mTitle) {
        this.mTitle = mTitle;
    }

    @Basic
    @Column(name = "m_detail", nullable = false, insertable = true, updatable = true, length = 65535)
    public String getmDetail() {
        return mDetail;
    }

    public void setmDetail(String mDetail) {
        this.mDetail = mDetail;
    }

    @Basic
    @Column(name = "m_cid", nullable = false, insertable = true, updatable = true)
    public int getmCid() {
        return mCid;
    }

    public void setmCid(int mCid) {
        this.mCid = mCid;
    }

    @Basic
    @Column(name = "m_region", nullable = false, insertable = true, updatable = true)
    public int getmRegion() {
        return mRegion;
    }

    public void setmRegion(int mRegion) {
        this.mRegion = mRegion;
    }

    @Basic
    @Column(name = "m_contact", nullable = false, insertable = true, updatable = true, length = 10)
    public String getmContact() {
        return mContact;
    }

    public void setmContact(String mContact) {
        this.mContact = mContact;
    }

    @Basic
    @Column(name = "m_contact_detail", nullable = false, insertable = true, updatable = true, length = 100)
    public String getmContactDetail() {
        return mContactDetail;
    }

    public void setmContactDetail(String mContactDetail) {
        this.mContactDetail = mContactDetail;
    }

    @Basic
    @Column(name = "m_address", nullable = false, insertable = true, updatable = true, length = 200)
    public String getmAddress() {
        return mAddress;
    }

    public void setmAddress(String mAddress) {
        this.mAddress = mAddress;
    }

    @Basic
    @Column(name = "m_logo", nullable = true, insertable = true, updatable = true, length = 255)
    public String getmLogo() {
        return mLogo;
    }

    public void setmLogo(String mLogo) {
        this.mLogo = mLogo;
    }

    @Basic
    @Column(name = "m_activity", nullable = false, insertable = true, updatable = true)
    public byte getmActivity() {
        return mActivity;
    }

    public void setmActivity(byte mActivity) {
        this.mActivity = mActivity;
    }

    @Basic
    @Column(name = "m_time", nullable = false, insertable = true, updatable = true)
    public Timestamp getmTime() {
        return mTime;
    }

    public void setmTime(Timestamp mTime) {
        this.mTime = mTime;
    }

    @Basic
    @Column(name = "m_time_end", nullable = false, insertable = true, updatable = true)
    public Timestamp getmTimeEnd() {
        return mTimeEnd;
    }

    public void setmTimeEnd(Timestamp mTimeEnd) {
        this.mTimeEnd = mTimeEnd;
    }

    @Basic
    @Column(name = "m_listorder", nullable = false, insertable = true, updatable = true)
    public short getmListorder() {
        return mListorder;
    }

    public void setmListorder(short mListorder) {
        this.mListorder = mListorder;
    }

    @Basic
    @Column(name = "m_create_time", nullable = false, insertable = true, updatable = true)
    public Timestamp getmCreateTime() {
        return mCreateTime;
    }

    public void setmCreateTime(Timestamp mCreateTime) {
        this.mCreateTime = mCreateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MianshihuiEntity that = (MianshihuiEntity) o;

        if (mActivity != that.mActivity) return false;
        if (mCid != that.mCid) return false;
        if (mId != that.mId) return false;
        if (mListorder != that.mListorder) return false;
        if (mRegion != that.mRegion) return false;
        if (mAddress != null ? !mAddress.equals(that.mAddress) : that.mAddress != null) return false;
        if (mContact != null ? !mContact.equals(that.mContact) : that.mContact != null) return false;
        if (mContactDetail != null ? !mContactDetail.equals(that.mContactDetail) : that.mContactDetail != null)
            return false;
        if (mCreateTime != null ? !mCreateTime.equals(that.mCreateTime) : that.mCreateTime != null) return false;
        if (mDetail != null ? !mDetail.equals(that.mDetail) : that.mDetail != null) return false;
        if (mLogo != null ? !mLogo.equals(that.mLogo) : that.mLogo != null) return false;
        if (mTime != null ? !mTime.equals(that.mTime) : that.mTime != null) return false;
        if (mTimeEnd != null ? !mTimeEnd.equals(that.mTimeEnd) : that.mTimeEnd != null) return false;
        if (mTitle != null ? !mTitle.equals(that.mTitle) : that.mTitle != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = mId;
        result = 31 * result + (mTitle != null ? mTitle.hashCode() : 0);
        result = 31 * result + (mDetail != null ? mDetail.hashCode() : 0);
        result = 31 * result + mCid;
        result = 31 * result + mRegion;
        result = 31 * result + (mContact != null ? mContact.hashCode() : 0);
        result = 31 * result + (mContactDetail != null ? mContactDetail.hashCode() : 0);
        result = 31 * result + (mAddress != null ? mAddress.hashCode() : 0);
        result = 31 * result + (mLogo != null ? mLogo.hashCode() : 0);
        result = 31 * result + (int) mActivity;
        result = 31 * result + (mTime != null ? mTime.hashCode() : 0);
        result = 31 * result + (mTimeEnd != null ? mTimeEnd.hashCode() : 0);
        result = 31 * result + (int) mListorder;
        result = 31 * result + (mCreateTime != null ? mCreateTime.hashCode() : 0);
        return result;
    }
}
